<?php
/* @var $this IptvLinkController */
/* @var $model IptvLink */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'iptv-link-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>
<?php 
//$program_id=$_REQUEST['program_id'];
        $sql="select * from zy_iptvprogram_list where program_id=".$program_id;
       // echo $sql;
       $result = yii::app()->db->createCommand($sql)->queryAll();

?>

	<p class="note"><?php echo Yii::t('base','Fields with <span class="required">*</span> are required.');?></p>

	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,Yii::t('base','title')); ?>
		<?php echo $form->hiddenField($model,'program_id',array('value'=>$program_id));?>
	  	<input type="text" id="program_id" readonly="true" value="<?php echo $result[0]['title']; ?>" />
		<?php echo $form->error($model,'program_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'link_text'); ?>
		<?php echo $form->textField($model,'link_text',array('size'=>400,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'link_text'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'link_address'); ?>
		<?php echo $form->textField($model,'link_address',array('size'=>400,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'link_address'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('base','Create') : Yii::t('base','Save')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->